#include "IncrementTimeTestStrategy.h"
#include <localview/LocalView.h>
#include <evolutive/TimeIncrementEvolutiveStrategy.h>
#include <localview/Street.h>
#include <controller/Case.h>
#include <iostream>
#include <unistd.h>

int main(int argc, char** argv) {

	LocalView lv("Node1", 0, 0);

	Node* localNode = lv.getNetwork();

	Street street1("rua1", 0);
	Street street2("rua2", 0);

	street1.setFlush(10);
	street1.setQueue(1);

	street2.setFlush(30);
	street2.setQueue(20);

	localNode->addStreet(&street1);
	localNode->addStreet(&street2);

	TimeIncrementEvolutiveStrategy strategy1;
	TimeIncrementEvolutiveStrategy strategy2;
	TimeIncrementEvolutiveStrategy strategy3;

	strategy1.start(&lv, 0);
	strategy2.start(&lv, 0);
	strategy3.start(&lv, 0);

	sleep(5);

	strategy1.stop();
	strategy2.stop();
	strategy3.stop();

	Case* result = strategy1.getResult();

	std::cout << "Increment: " << ((int)result->getLocalGreenExtension()) << "\n";

	return 0;
}
